# -*- coding:utf-8 -*-

from com.mat.rpa.utils.globalConstants import GlobalConstants
from com.mat.rpa.views.workWindow.leftPanel.directiveTree import treeItem
from . import fileFolderOperationConstants

class FileFolderOperationSubDirectiveTree(treeItem.TreeItemWithID):
    def __init__(self, parent):
        super(FileFolderOperationSubDirectiveTree, self).__init__(parent)
        self.createFileFolderOperationTreeNode()

    def createFileFolderOperationTreeNode(self):
        self.nodeType = GlobalConstants.treeBranchType
        self.directiveType = "fileFolderOperations"
        self.setText(0,"文件夹操作")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, fileFolderOperationConstants.FileFolderOperationConstants.gettingFileFolderListDirective, "获取文件夹列表")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, fileFolderOperationConstants.FileFolderOperationConstants.gettingSelectedFileOrFolderListDirective, "获取选中文件(夹)列表")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, fileFolderOperationConstants.FileFolderOperationConstants.openningFileFolderDirective, "打开文件夹")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, fileFolderOperationConstants.FileFolderOperationConstants.creatingFileFolderDirective, "创建文件夹")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, fileFolderOperationConstants.FileFolderOperationConstants.deletingFileFolderDirective, "删除文件夹")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, fileFolderOperationConstants.FileFolderOperationConstants.clearingFileFolderDirective, "清空文件夹")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, fileFolderOperationConstants.FileFolderOperationConstants.copyingFileFolderDirective, "拷贝文件夹")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, fileFolderOperationConstants.FileFolderOperationConstants.movingFileFolderDirective, "移动文件夹")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, fileFolderOperationConstants.FileFolderOperationConstants.renamingFileFolderDirective, "文件夹重命名")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, fileFolderOperationConstants.FileFolderOperationConstants.gettingFileFolderPathDirective,
                            "获取文件夹路径")